package com.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

import com.hibernate.HibernateSessionFactory;
import com.model.Serverlog;

/**
 * 对<code>Serverlog<code>模型进行增删改查操作的类
 *  
 * @author 0912652
 */

public class ServerLogDao {
	

	public List<Serverlog> findLogBySid(int sid){
		Session session = HibernateSessionFactory.getSession();
		Criteria criteria = session.createCriteria(Serverlog.class);
		Criteria cr = criteria.createCriteria("customerserver");
		
		cr.add(Restrictions.eq("sid", sid));
		List<Serverlog> list = criteria.list();
		return list;
	}

}
